package com.cake.dao;

import java.util.List;

import com.cake.dao.base.IBaseDao;
import com.cake.entity.XxMenu;

public interface XxMenuMapper extends IBaseDao<XxMenu>{
    int deleteByPrimaryKey(Long id);

    int insert(XxMenu record);

    int insertSelective(XxMenu record);

    XxMenu selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(XxMenu record);

    int updateByPrimaryKey(XxMenu record);
    
    /**
     * 查询第一级菜单信息
     * @return
     */
    List<XxMenu> selectFirstMenus(Long adminId);
    
    /**
     * 根据父级id查询子类菜单信息
     * @param parentId
     * @return
     */
    List<XxMenu>selectMenuByParentId(Long parentId);
    
    /**
     * 根据roleId查询菜单
     * @param roleId
     * @return
     */
    List<XxMenu>selectMenusByRoleId(Long roleId);

    /**
     * 查询一级菜单
     * @return
     */
	List<XxMenu> selectFirstGradeMenus();
	
	/**
	 * 根据用户id查询拥有的菜单
	 * @param adminId
	 * @return
	 */
	List<XxMenu> selectMenusByAdminId(Long adminId);

}